<?php
/**
 * Created by PhpStorm.
 * User: xpz
 * Date: 2021/5/21
 * Time: 9:30
 */

namespace app\common\model;
use think\Model;

class VisitorMessage  extends Model
{
    protected $name = "visitor_message";
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'add_time';
    protected $updateTime = false;
    // 追加属性
    protected $append = [
    ];


    public static function getInfo($id){
        return self::where('id', $id)->find();
    }

    public static function getList($adminId){
        return self::where('admin_id', $adminId)->order('id desc')->select();
    }

}